<?php
namespace BP\Frm;
require_once("BP/En/Map.php");
require_once("BP/Web/WebUser.php");
class GenerBill extends Entity {
	public function getPK () 
	{
		return GenerBillAttr::$WorkID;
	}
	public function getFlowNote () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$FlowNote);
	}
	public function setFlowNote ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$FlowNote, $value);
	}
	public function getBillNo () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$BillNo);
	}
	public function setBillNo ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$BillNo, $value);
	}
	public function getFrmID () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$FrmID);
	}
	public function setFrmID ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$FrmID, $value);
	}
	public function getFrmName () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$FrmName);
	}
	public function setFrmName ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$FrmName, $value);
	}
	public function getPRI () 
	{
		return $this->GetValIntByKey(GenerBillAttr::$PRI);
	}
	public function setPRI ($value) // [int value]
	{
		$this->SetValByKey(GenerBillAttr::$PRI, $value);
	}
	public function getTodoEmpsNum () 
	{
		return $this->GetValIntByKey(GenerBillAttr::$TodoEmpsNum);
	}
	public function setTodoEmpsNum ($value) // [int value]
	{
		$this->SetValByKey(GenerBillAttr::$TodoEmpsNum, $value);
	}
	public function getTodoEmps () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$TodoEmps);
	}
	public function setTodoEmps ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$TodoEmps, $value);
	}
	public function getEmps () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$Emps);
	}
	public function setEmps ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$Emps, $value);
	}
	public function getTaskSta () 
	{
		return $TaskSta->forValue($this->GetValIntByKey(GenerBillAttr::$TaskSta));
	}
	public function setTaskSta ($value) // [TaskSta value]
	{
		$this->SetValByKey(GenerBillAttr::$TaskSta, $value->getValue());
	}
	public function getFK_FrmTree () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$FK_FrmTree);
	}
	public function setFK_FrmTree ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$FK_FrmTree, $value);
	}
	public function getFK_Dept () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$FK_Dept);
	}
	public function setFK_Dept ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$FK_Dept, $value);
	}
	public function getTitle () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$Title);
	}
	public function setTitle ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$Title, $value);
	}
	public function getGuestNo () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$GuestNo);
	}
	public function setGuestNo ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$GuestNo, $value);
	}
	public function getGuestName () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$GuestName);
	}
	public function setGuestName ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$GuestName, $value);
	}
	public function getRDT () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$RDT);
	}
	public function setRDT ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$RDT, $value);
	}
	public function getSDTOfNode () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$SDTOfNode);
	}
	public function setSDTOfNode ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$SDTOfNode, $value);
	}
	public function getSDTOfFlow () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$SDTOfFlow);
	}
	public function setSDTOfFlow ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$SDTOfFlow, $value);
	}
	public function getWorkID () 
	{
		return $this->GetValInt64ByKey(GenerBillAttr::$WorkID);
	}
	public function setWorkID ($value) // [long value]
	{
		$this->SetValByKey(GenerBillAttr::$WorkID, $value);
	}
	public function getFID () 
	{
		return $this->GetValInt64ByKey(GenerBillAttr::$FID);
	}
	public function setFID ($value) // [long value]
	{
		$this->SetValByKey(GenerBillAttr::$FID, $value);
	}
	public function getPWorkID () 
	{
		return $this->GetValInt64ByKey(GenerBillAttr::$PWorkID);
	}
	public function setPWorkID ($value) // [long value]
	{
		$this->SetValByKey(GenerBillAttr::$PWorkID, $value);
	}
	public function getPNodeID () 
	{
		return $this->GetValIntByKey(GenerBillAttr::$PNodeID);
	}
	public function setPNodeID ($value) // [int value]
	{
		$this->SetValByKey(GenerBillAttr::$PNodeID, $value);
	}
	public function getPFrmID () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$PFrmID);
	}
	public function setPFrmID ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$PFrmID, $value);
	}
	public function getPEmp () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$PEmp);
	}
	public function setPEmp ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$PEmp, $value);
	}
	public function getStarter () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$Starter);
	}
	public function setStarter ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$Starter, $value);
	}
	public function getStarterName () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$StarterName);
	}
	public function setStarterName ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$StarterName, $value);
	}
	public function getDeptName () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$DeptName);
	}
	public function setDeptName ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$DeptName, $value);
	}
	public function getNDStepName () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$NDStepName);
	}
	public function setNDStepName ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$NDStepName, $value);
	}
	public function getNDStep () 
	{
		return $this->GetValIntByKey(GenerBillAttr::$NDStep);
	}
	public function setNDStep ($value) // [int value]
	{
		$this->SetValByKey(GenerBillAttr::$NDStep, $value);
	}
	public function getBillState () 
	{
		return BillState->forValue($this->GetValIntByKey(GenerBillAttr::$BillState));
	}
	public function setBillState ($value) // [BillState value]
	{
		$this->SetValByKey(GenerBillAttr::$BillState, $value->getValue());
	}
	public function getBillStateText () 
	{
		return $this->GetValRefTextByKey(GenerBillAttr::$BillState);
	}
	public function getGUID () 
	{
		return $this->GetValStrByKey(GenerBillAttr::$GUID);
	}
	public function setGUID ($value) // [String value]
	{
		$this->SetValByKey(GenerBillAttr::$GUID, $value);
	}
	public function getHisUAC () 
	{
		$uac = new UAC();
		if ($WebUser->getNo()->equals("admin"))
		{
			$uac->IsDelete =  FALSE ;
			$uac->IsUpdate =  TRUE ;
			return $uac;
		}
		$uac->Readonly();
		return $uac;
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public static function constructor__L ($workid) // [long workid]
	{
		$me = new self();
		$me->setWorkID($workid);
		$me->Retrieve();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("Frm_GenerBill", "单据控制�?");
		$map->Java_SetEnType($EnType->Sys);
		$map->AddTBIntPK(GenerBillAttr::$WorkID, 0, "WorkID",  TRUE ,  TRUE );
		$map->AddTBString(GenerBillAttr::$FK_FrmTree, NULL, "单据类别",  TRUE ,  FALSE , 0, 10, 10);
		$map->AddTBString(GenerBillAttr::$FrmID, NULL, "单据ID",  TRUE ,  FALSE , 0, 100, 10);
		$map->AddTBString(GenerBillAttr::$FrmName, NULL, "单据名称",  TRUE ,  FALSE , 0, 200, 10);
		$map->AddTBString(GenerBillAttr::$BillNo, NULL, "单据编号",  TRUE ,  FALSE , 0, 100, 10);
		$map->AddTBString(GenerBillAttr::$Title, NULL, "标题",  TRUE ,  FALSE , 0, 1000, 10);
		$map->AddDDLSysEnum(GenerBillAttr::$BillSta, 0, "状�??(�?)",  TRUE ,  FALSE , GenerBillAttr::$BillSta, "@0=运行中@1=已完成@2=其他");
		$map->AddDDLSysEnum(GenerBillAttr::$BillState, 0, "单据状�??",  TRUE ,  FALSE , GenerBillAttr::$BillState, "@0=空白@1=草稿@2=编辑中@100=归档");
		$map->AddTBString(GenerBillAttr::$Starter, NULL, "创建�?",  TRUE ,  FALSE , 0, 200, 10);
		$map->AddTBString(GenerBillAttr::$StarterName, NULL, "创建人名�?",  TRUE ,  FALSE , 0, 200, 10);
		$map->AddTBString(GenerBillAttr::$Sender, NULL, "发�?�人",  TRUE ,  FALSE , 0, 200, 10);
		$map->AddTBDateTime(GenerBillAttr::$RDT, "记录日期",  TRUE ,  TRUE );
		$map->AddTBDateTime(GenerBillAttr::$SendDT, "单据活动时间",  TRUE ,  TRUE );
		$map->AddTBInt(GenerBillAttr::$NDStep, 0, "步骤",  TRUE ,  FALSE );
		$map->AddTBString(GenerBillAttr::$NDStepName, NULL, "步骤名称",  TRUE ,  FALSE , 0, 100, 10);
		$map->AddTBString(GenerBillAttr::$FK_Dept, NULL, "部门",  TRUE ,  FALSE , 0, 100, 10);
		$map->AddTBString(GenerBillAttr::$DeptName, NULL, "部门名称",  TRUE ,  FALSE , 0, 100, 10);
		$map->AddTBInt(GenerBillAttr::$PRI, 1, "优先�?",  TRUE ,  TRUE );
		$map->AddTBDateTime(GenerBillAttr::$SDTOfNode, "节点应完成时�?",  TRUE ,  TRUE );
		$map->AddTBDateTime(GenerBillAttr::$SDTOfFlow, "单据应完成时�?",  TRUE ,  TRUE );
		$map->AddTBString(GenerBillAttr::$PFrmID, NULL, "父单据编�?",  TRUE ,  FALSE , 0, 3, 10);
		$map->AddTBInt(GenerBillAttr::$PWorkID, 0, "父单据ID",  TRUE ,  TRUE );
		$map->AddDDLSysEnum(GenerBillAttr::$TSpan, 0, "时间�?",  TRUE ,  FALSE , GenerBillAttr::$TSpan, "@0=本周@1=上周@2=上上周@3=更早");
		$map->AddTBString(GenerBillAttr::$AtPara, NULL, "参数(单据运行设置临时存储的参�?)",  TRUE ,  FALSE , 0, 2000, 10);
		$map->AddTBString(GenerBillAttr::$Emps, NULL, "参与�?",  TRUE ,  FALSE , 0, 4000, 10);
		$map->AddTBString(GenerBillAttr::$GUID, NULL, "GUID",  FALSE ,  FALSE , 0, 36, 10);
		$map->AddTBString(GenerBillAttr::$FK_NY, NULL, "年月",  FALSE ,  FALSE , 0, 7, 7);
		$this->set_enMap($map);
		return $this->get_enMap();
	}
}
?>
